class Solution
{
public:
    vector<string> simplifiedFractions(int n)
    {
        vector<string> answer;
        for (int i = 2; i <= n; ++i)
        {
            for (int j = 1; j < i; ++j)
            {
                if (gcd(i, j) == 1)
                {
                    answer.push_back(toFrac(j, i));
                }
            }
        }
        return answer;
    }

    inline string toFrac(int numerator, int denominator)
    {
        return to_string(numerator) + "/" + to_string(denominator);
    }
};